import Vue from 'vue';
import App from './App';
import store from './store';
import router from './router';

import 'normalize.css/normalize.css'; // A modern alternative to CSS resets

import ElementUI from 'element-ui';
import '@/styles/element-variables.scss';
ElementUI.Dialog.props.closeOnClickModal.default = false;
import locale from 'element-ui/lib/locale/lang/en'; // lang i18n

import preventReClick from '@/utils/plugins.js';
Vue.use(preventReClick);

import '@/styles/index.scss'; // global css

import 'video.js/dist/video-js.css';
import Video from 'video.js';
Vue.prototype.$video = Video;

import { message } from '@/utils/resetMessage';

import '@/icons'; // icon
import '@/permission'; // permission control

/**
 * If you don't want to use mock-server
 * you want to use MockJs for mock api
 * you can execute: mockXHR()
 *
 * Currently MockJs will be used in the production environment,
 * please remove it before going online! ! !
 */
// set ElementUI lang to EN
Vue.use(ElementUI, {
  locale,
  size: 'small'
});

Vue.prototype.$message = message;

Vue.config.productionTip = false;

import global from '@/utils/global';

Vue.use(global);

window.vm = new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
});
